package ListPractice;

/**
 * @author Xiao
 * @date 2021/7/12
 */
public class Car {
    /**
     * 需求：
     * 1,自定义一个汽车类Car
     *      * 	 包含属性： 品牌 brand (String 类型)
     *      * 				  里程  mile (int 类型)
     *      * 				  价格  price (double 类型)
     *      *
     *      * 	 要求所有属性私有修饰
     *      * 		生成get、set方法
     *      * 		空参、满参构造
     */
    private String brand;
    private int mile;
    private double price;

    public Car(String brand, int mile, double price) {
        this.brand = brand;
        this.mile = mile;
        this.price = price;
    }

    public Car() {
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public int getMile() {
        return mile;
    }

    public void setMile(int mile) {
        this.mile = mile;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }
}
